<?php
header("Content-type: text/xml; charset=utf-8");

$f = fopen("log.log", "a");
fwrite($f, "6 - Accessed at " . date(DATE_RFC822) . " from: " . $_SERVER['REMOTE_ADDR'] . "\n");

fclose($f);

echo '<?xml version="1.0" encoding="UTF-8"?>';

echo '<Module>
    <ModulePrefs height="50" title="InLinkzScripter">
    </ModulePrefs>
    <Content type="html">
   <![CDATA[
   <script>
   console.log("Starting now (widget)");
      var el = document.getElementsByClassName(\'InLinkzContainer\')[0];
      alert("6 El = " + el);
      if(el!=null) {
        var script = document.createElement("script");
        script.src = "http://static.inlinkz.com/cs2.js";
        script.type= \'text/javascript\';
        script.async = true;

        el.appendChild(script);
      }

    </script>
  ]]>
 
    </Content>
</Module>';

?>